import sys
import Ui_mainWindow
from PyQt5.QtWidgets import QApplication, QMainWindow, QPushButton

def delitest2():
    print('delitest2')

if __name__ == '__main__':


    app = QApplication(sys.argv)
    mainWindow = QMainWindow()
    ui = Ui_mainWindow.Ui_MainWindow()
    ui.setupUi(mainWindow)
    ui.pushButton.clicked.connect(delitest2)
    #这里告诉我们，一个信号可以被多个slot捕获。且都会执行，先手顺序取决于slot捕捉信号的顺序
    mainWindow.show()
    sys.exit(app.exec_())